# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataplexExternalTable do
  @moduledoc """
  External table registered by Dataplex. Dataplex publishes data discovered from an asset into multiple other systems (BigQuery, DPMS) in form of tables. We call them "external tables". External tables are also synced into the Data Catalog. This message contains pointers to those external tables (fully qualified name, resource name et cetera) within the Data Catalog.

  ## Attributes

  *   `dataCatalogEntry` (*type:* `String.t`, *default:* `nil`) - Name of the Data Catalog entry representing the external table.
  *   `fullyQualifiedName` (*type:* `String.t`, *default:* `nil`) - Fully qualified name (FQN) of the external table.
  *   `googleCloudResource` (*type:* `String.t`, *default:* `nil`) - Google Cloud resource name of the external table.
  *   `system` (*type:* `String.t`, *default:* `nil`) - Service in which the external table is registered.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dataCatalogEntry => String.t() | nil,
          :fullyQualifiedName => String.t() | nil,
          :googleCloudResource => String.t() | nil,
          :system => String.t() | nil
        }

  field(:dataCatalogEntry)
  field(:fullyQualifiedName)
  field(:googleCloudResource)
  field(:system)
end

defimpl Poison.Decoder,
  for: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataplexExternalTable do
  def decode(value, options) do
    GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataplexExternalTable.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataplexExternalTable do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
